//
//  ParentsViewController.h
//  IM_LearningGYDF
//
//  Created by gydf on 16/3/9.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HttpRequest.h"
#define getServiceTime @"getServiceTime"//服务器时间

@interface ParentsViewController : UIViewController
{
    BOOL _isLoadMore;
    BOOL _isRefresh;
    NSString  *_pageNum;//请求的列表页数
    UITapGestureRecognizer *_tapGesture;//手势
    //UILabel * _alertLabel;
}
@property(nonatomic,strong)UIActivityIndicatorView * centerIndicator;//菊花
@property(nonatomic,assign)BOOL isLoadMore;//是否正在加载更多
@property(nonatomic,assign)BOOL isRefresh;//是否正在刷新
@property (nonatomic,strong) NSString *serviceTime;//服务器时间
//- (void)createLabelWithPoint:(CGPoint)point addToView:(UIView*)view;
//页面数据初始化
- (void)dataInit;
//项目首页初始化
- (void)myAppInit;
//返回按钮
- (void)backClick;
//设置导航栏标题
- (void)setNavigationTitle:(NSString *)title;
//设置导航栏左边按钮
- (void)setLeftBackNavigation;
//设置导航栏右边按钮
- (void)setRightNavigation:(NSString *)title;
//-(void)setRightSearchBarButtonItemWith:(SEL)sel;
//导航栏右边按钮点击触发
- (void)rightItemClick:(UIBarButtonItem *)item;
//设置导航栏右侧返回首页按钮
- (void)setRightBackNavigation;
//获取服务器时间
- (void)serverDateRequest;
////post请求
//
//- (void)postWithURLAPI:(NSString *)API parameters:(id)parameters success:(void (^)(id responseObject,NSString *bindingIdentity))success failure:(void (^)(NSError *error,NSString *bindingIdentity))failure;
////get请求
//- (void)getWithURLAPI:(NSString *)API success:(void (^)(id responseObject,NSString *bindingIdentity))success failure:(void (^)(NSError *error,NSString *bindingIdentity))failure;
//- (void)requestSuccessWithResponse:(id)response bindingIdentity:(NSString *)bindingIdentity;

//增加下拉刷新功能
- (void)addTableViewUpdateRefresh:(UITableView *)tableView BindingIdentity:(NSString *)BindingIdentity;
//增加上拉加载功能
- (void)addTableViewLoadMoreData:(UITableView *)tableView BindingIdentity:(NSString *)BindingIdentity;
//上拉加载成功后调用该方法
- (void)loadMoreDataWithBindingIdentity:(NSString *)BindingIdentity;
//下拉刷新成功后调用该方法
- (void)loadUpdateRefreshWithBindingIdentity:(NSString *)BindingIdentity;
//结束刷新
- (void)endRefreshWithTableView:(UITableView *)tableView;
//没有更多数据
- (void)noMoreDataWithTableView:(UITableView *)tableView;
//隐藏上拉加载的footer
- (void)hideMjRefreshFooterViewWithTableView:(UITableView *)tableView isHide:(BOOL)isHide;

//网络连接失败页面
- (void)addReminderViewWithFrame:(CGRect)frame msg:(NSString *)msg backView:(UIView *)view;
//移除网络连接失败页面
- (void)removeReminderView;
-(void)setLeftBackHidden;
//比较两个时间字符串
- (BOOL)compareOneTime:(NSString *)beginStr withAnotherTime:(NSString *)endStr;
//与当前时间比较
- (BOOL)compareTime:(NSString *)beginStr;
//增加取消键盘手势
- (void)addTapGestureRecognizerWithView:(id)view;
//移除手势
- (void)removeTapGestureRecognizerWithView:(id)view;
//查找业务类型名称
- (NSString *)getStatusLabelTextWithBusinessCode:(NSString *)businessCode isOwn:(NSString *)isOwn isOperate:(NSString *)isOperate state:(NSString *)state;
//获取业务类型
- (NSString *)getVacateTypeWithBusinessCode:(NSString *)businessCode sex:(NSString *)sex;
//加载失败后刷新页面
- (void)addRefreshViewWithFrame:(CGRect)frame msg:(NSString *)msg backView:(UIView *)view refreshMsg:(NSString *)refreshMsg;
//刷新页面事件
- (void)refreshButtonClick;
//移除刷新页面
- (void)removeRefreshView;
@end
